package com.logistics.modules.transportationManagement.dao;
import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logistics.modules.transportationManagement.entity.ClientorderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 
 * 
 * @author HURRICANE
 * @email HURRICANE@nb.com
 * @date 2022-05-06 18:12:10
 */
@Mapper
public interface ClientorderDao extends BaseMapper<ClientorderEntity> {

    IPage<ClientorderEntity> selectAll(@Param("page") IPage<ClientorderEntity> page,
                                       @Param("cargoType") Integer cargoType,
                                       @Param("cargoName") String cargoName,
                                       @Param("lastName") String jiName,
                                       @Param("phoneNumber") String phoneNumber,
                                       @Param("status") Boolean status);

    ClientorderEntity selectOneById(@Param("id") Integer id);

    int updateSelective(ClientorderEntity clientorderEntity);

    int updateStatusById(@Param("status") Integer status, @Param("id") Integer id);
    //查询全部已完成
    List<Integer> selectAllClientorderCompleted();
    //查询今年12月份已完成订单
    List<Integer> selectAllClientorderCompletedYear();

    /**
     * 获取最近七天的日期
     */
    List<String> getTheDateOfTheLastSevenDays();


}
